<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<body>
<section id="editor-section" class="pane pane-request request-common" style="height: calc(100% - 48px)" th:fragment="editor-section">

    <div class="draft-ribbon" style="" onclick="showExamplePanel()">
        <div class="draft-ribbon-text"> New</div>
    </div>
    <div class="editable-input-container request-name" style="margin-top: 18px;">
        <div class="editable-input input-append read-only">
            <input type="text" class="gwt-TextBox gwt-TextBox-readonly api-info-comment" placeholder="Comment" required="true" maxlength="256" readonly="" value="Request">
            <span class="add-on"><i class="icon-pencil"></i></span></div>
        <div class="editable-input-error" title=""></div>
    </div>
    <div class="content" style="margin-top:10px;height:calc(100% - 130px); ">
        <div class="service">
            <div class="row-uri-in-request-view">
                <div class="row-uri">
                    <input type="hidden" class="api-info-id">
                    <input type="hidden" class="api-info-directory" value="">
                    <input type="hidden" class="api-info-editor" value="admin">
                    <div class="uri-db" id="uri-db">
                        <div class="uri-help" >
                            <a class="help-link" href="http://tools.ietf.org/html/rfc7231#section-4" tabindex="-1" target="_blank"> Datasource </a>
                        </div>
                        <div>
                            <div class="btn-group input-append split-dropdown" e2e-tag="db-selector">
                                <div class="input-append dropdown-toggle" data-toggle="dropdown">
                                    <input type="text" class="gwt-TextBox api-info-datasource" style="width: 85px;cursor:pointer;" readonly th:attr="default-value=${dataSourceList[0]}">
                                    <span class="add-on">
                                        <a href="javascript:;" class="btn btn-small btn-link split-dropdown-trigger" tabindex="-1">
                                            <i class="icon-caret-down"> </i>
                                        </a>
                                    </span>
                                </div>
                                <ul class="dropdown-menu" >
                                    <li th:each="item,infoStat : ${dataSourceList}"><a href="javascript:;" th:text="${item}"> </a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="uri-method">
                        <div class="uri-help">
                            <a class="help-link" href="http://tools.ietf.org/html/rfc7231#section-4" tabindex="-1" target="_blank"> Method </a>
                        </div>
                        <div>
                            <div class="btn-group input-append split-dropdown" e2e-tag="method-selector">
                                <div class="input-append dropdown-toggle" data-toggle="dropdown">
                                    <input type="text" class="gwt-TextBox api-info-method" style="width: 85px;" value="GET">
                                    <span class="add-on">
                                                                <a href="javascript:;" class="btn btn-small btn-link split-dropdown-trigger" tabindex="-1">
                                                                    <i class="icon-caret-down"> </i>
                                                                </a>
                                                            </span>
                                </div>
                                <ul class="dropdown-menu">
                                    <li><a href="javascript:;"><i></i> GET </a></li>
                                    <li><a href="javascript:;"><i></i> POST </a></li>
                                    <li><a href="javascript:;"><i></i> PUT </a></li>
                                    <li><a href="javascript:;"><i></i> DELETE </a></li>
                                    <li><a href="javascript:;"><i></i> HEAD </a></li>
                                    <li><a href="javascript:;"><i></i> OPTIONS </a></li>
                                    <li><a href="javascript:;"><i></i> PATCH </a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="uri-editor">
                        <div class="uri-help"><a> Path </a></div>
                        <div class="uri-input">
                                                    <span class="expression-input input-append uri-path">
                                                        <input type="text" class="gwt-TextBox api-info-path" spellcheck="false" autocomplete="off" e2e-tag="uri-input"
                                                               placeholder="Type an Path" style="padding-left:10px;" onblur="fullPath(this)">
                            <div class="uri-length" style="display: inline;">length: 0 char(s)</div>
                        </div>
                    </div>
                    <div class="uri-editor">
                        <div class="uri-help"><a> FullPath </a></div>
                        <div class="uri-input">
                                                    <span class="expression-input input-append uri-path">
                                                        <input type="text" class="gwt-TextBox api-info-fullpath" readonly="readonly" spellcheck="false"  style="padding-left:10px;" >
                            <div class="uri-length" style="display: inline;">length: 0 char(s)</div>
                        </div>
                    </div>
                </div>
                <div class="btn-group send">
                    <a href="javascript:;" id="save-editor-btn" onclick="saveEditor('#editor-section')" class="btn btn-send btn-primary"
                       e2e-tag="btn-send">
                        <i class="icon-send"></i> Save</a>
                    <a href="javascript:;" class="btn btn-primary btn-send dropdown-toggle" data-toggle="dropdown" e2e-tag="btn-send-additional-actions" tabindex="-1"><i
                            class="icon-caret-down"></i> </a>
                    <ul class="dropdown-menu pull-right">
                        <li><a href="javascript:;" onclick="saveAsEditor('#editor-section')"><i></i> Save as </a></li>
                    </ul>
                </div>
            </div>

        </div>

        <div class="code-body"  style="height: 100%;margin-top:25px;">
            <div id="editor-btns" style="height: 24px;">
                <div class="item debug-btn" title="DEBUG运行脚本 快捷键Ctrl + Alt + Enter" onclick="runApi(true)" >Debug</div>
                <div class="item run-btn" title="运行脚本 快捷键Ctrl + Enter" onclick="runApi(false)">Run</div>
            </div>
            <div id="monaco-editor" style="font-size: 13px;width:100%;height: calc(100% - 24px);"></div>
        </div>
        <div class="diff-body"  style="height: 100%;margin-top:25px;display: none">
            <div  style="height: 24px;" class="title">
                <div class="left" style="width: 50%;float:left;">
                    <div class="uri-input-lock"><i style="margin-left: 5px;" class="fa fa-lock"></i>
                        <span style="padding-left:10px;" id="diff-left-id"></span>
                        <span style="padding-left:10px;" id="diff-left-time"></span>
                        <div  style="float:right;margin-right:20px;" class="item" title="" onclick="acceptLeft()" >Accept Left</div>
                    </div>
                </div>
                <div class="right" style="width: 50%;float:left;">
                    <div class="m-left">Local</div>
                    <div class="item" title="" onclick="confirmDiff()">Confirm</div>
                    <div class="item" title="" onclick="cancelDiff()">Cancel</div>
                </div>
            </div>
            <div id="diff-editor" style="font-size: 13px;width:100%;height: calc(100% - 24px);"></div>
        </div>

    </div>

</section>
</body>
</html>

